//
//  TaskDetailDataSource.m
//  Trackit
//
//  Created by yaodaobin on 2017/4/9.
//  Copyright © 2017年 yaodaobin. All rights reserved.
//

#import "TaskDetailDataSource.h"

@implementation TaskDetailDataSource

+ (TaskDetailDataSource *)createTaskItem:(NSString *)title content:(NSString *)content {
    TaskDetailDataSource *item = [[TaskDetailDataSource alloc] init];
    item.title = title;
    item.content = content;
    return item;
}

+ (void)createTaskDetailDataSource:(NSMutableArray *)array model:(TaskDetailModel *)model {
    if (!model) {
        return;
    }
    [array removeAllObjects];
    [array addObject:[TaskDetailDataSource createTaskItem:NSLocalizedString(@"任务名称", nil) content:model.taskName]];
    [array addObject:[TaskDetailDataSource createTaskItem:NSLocalizedString(@"任务类型", nil) content:model.collectDataTypeName]];
    [array addObject:[TaskDetailDataSource createTaskItem:NSLocalizedString(@"创建时间", nil) content:model.createCalendarDate]];
    [array addObject:[TaskDetailDataSource createTaskItem:NSLocalizedString(@"提交次数", nil) content:model.subitTimes]];
    [array addObject:[TaskDetailDataSource createTaskItem:NSLocalizedString(@"任务描述", nil) content:model.taskDescription]];

}

@end
